from django.conf.urls.defaults import *
from web.ideas.views import *

urlpatterns = patterns('',
    # Example:
    # (r'^web/', include('web.apps.foo.urls.foo')),

    # Uncomment this for admin:
#     (r'^admin/', include('django.contrib.admin.urls')),
   
    #Cuidado, nao usar em producao
    (r'^extras/(?P<path>.*)$', 'django.views.static.serve', {'document_root': 'ideas/templates'}),
    
    
    (r'^ideas/$', 'web.ideas.views.index'),
    
    (r'^ideas/wiki/$', 'web.ideas.views.null'),
    (r'^ideas/wiki/search/$', 'web.ideas.views.search'),
    (r'^ideas/wiki/list/$', 'web.ideas.views.list'),
    (r'^ideas/wiki/\w+/$', 'web.ideas.views.null'), #catch all /wiki/
    
    (r'^ideas/comments/$', 'web.ideas.views.null'),
    (r'^ideas/comments/latest/$', 'web.ideas.views.latestComments'),
    (r'^ideas/comments/\w+/$', 'web.ideas.views.null'), #catch all /comments/
    
    (r'^ideas/tags/$', 'web.ideas.views.null'),
    (r'^ideas/tags/cloud/$', 'web.ideas.views.tagCloud'),
    (r'^ideas/tags/(?P<tag_name>\w+)/$', 'web.ideas.views.viewTag'),

    
    (r'^ideas/(?P<idea_title>\w+)/$', 'web.ideas.views.view'),
    (r'^ideas/(?P<idea_title>\w+)/create/$', 'web.ideas.views.create'),
    (r'^ideas/(?P<idea_title>\w+)/remove/$', 'web.ideas.views.remove'),
    (r'^ideas/(?P<idea_title>\w+)/edit/$', 'web.ideas.views.edit'),
    (r'^ideas/(?P<idea_title>\w+)/comments/$', 'web.ideas.views.comments'),

)
